home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Extra 1996 #3 / AmigaPlus_CD-ROM-EXTRA_Nr.3.bin / aminet-spiele / role on / dma / install < prev    next >
Text File  |  1995-06-27  |  6KB  |  288 lines

  1. ;
  2. ; Installation script converted from Final Data HDInstall
  3. ;
  4. ; Sorry about that !
  5. ;
  6.  
  7.  
  8. (set is_update 0)
  9. (set @user-level 1)    ; force to use average mode
  10. (set #bad-kick
  11. (cat "You must be using Kickstart 2.04 to install using this script."
  12. ))
  13.  
  14. (if (< (/ (getversion) 65536) 37)
  15. (
  16.     (abort #bad-kick)
  17. ))
  18.  
  19. (complete 0)
  20.  
  21. (set DMA_dest
  22.     (askdir
  23.         (prompt "In which disk or drawer should the "
  24.                     "DMA drawer be created in?")
  25.         (help "The installation utility will create a drawer named "
  26.             "\"DMA\" in the selected drawer or directory.  All "
  27.             "DMA files and drawers will be placed inside "
  28.             "the new directory.")
  29.         (default @default-dest)
  30.     )
  31. )
  32.  
  33. ; Check if this is an update
  34. ; the Mods directory is a tell-tale sign
  35. ; that DMA is already installed here
  36.  
  37. (if (exists (tackon DMA_dest "Mods"))
  38.     (set is_update 1)
  39.     (    (if (exists (tackon DMA_dest "DMA"))
  40.             (set is_update 1)
  41.             (makedir (tackon DMA_dest "DMA") (infos))
  42.         )
  43.         (set DMA_dest (tackon DMA_dest "DMA"))
  44.     )
  45. )
  46.  
  47. (set @default-dest DMA_dest)
  48. (set disk_space (getdiskspace DMA_dest))
  49.  
  50. (set disk_space_needed 500000)
  51.  
  52. (if (AND (< disk_space disk_space_needed) (NOT is_update))
  53.     (
  54.         (set answer1
  55.             (askbool
  56.                 (prompt    "There may not be enough room available on "
  57.                             "this drive to install \"DMA\". "
  58.                             "Do you wish to continue?")
  59.                 (help    "DMA needs approximately .5 megabytes of "
  60.                         "disk space for a complete installation or .5 megabytes "
  61.                         "for a minimal installation. If Final Data is already "
  62.                         "installed on this partition, you may wish to continue. "
  63.                         "Otherwise, press ABORT or NO now and either free some "
  64.                         "space on this partition or select a different partition "
  65.                         "for the installation.")
  66.             )
  67.         )
  68.         (if (NOT answer1)
  69.             (abort "DMA installation cancelled. Not enough disk "
  70.                     "space on Volume \""
  71.                     (getdevice @default-dest)
  72.                     "\"."
  73.             )
  74.         )
  75.     )
  76. )
  77.  
  78. ; Allow updating user to select what they want updated
  79.  
  80. (if is_update
  81.     ; YES - already installed
  82.     (set install_options
  83.         (askoptions
  84.             (prompt "What parts would you like to update?")
  85.             (help @askoptions-help)
  86.             (choices
  87.                 "DMA Program"
  88.                 "Modules"
  89.                 "Sounds"
  90.                 "Documentation"
  91.                                 "Libraries")
  92.             (default 11)        ; default to 0001-1001 = (1)Program, (8)Sys Files and (16)Libraries
  93.         )
  94.     )
  95.  
  96.     ; NO - First time install
  97.         (set install_options 31)    ; hex 3F - 0011-1111 - all six options on
  98. )
  99.  
  100. (set error 0)
  101.  
  102. ; Installing files from ""
  103. (if (IN install_options 0 1 2 3 4)
  104.     (
  105.         ; -----------------
  106.         ; Copy the CloseWB program to the hard drive
  107.         ; so everyone is guaranteed to have it.
  108.         ; -----------------
  109.         (if (NOT is_update)
  110.             (copyfiles
  111.                 (source "c/CloseWB")
  112.                 (dest "C:")
  113.             )
  114.         )
  115.         ; -----------------
  116.         ; If installing/updating the program
  117.         ; -----------------
  118.         (if (IN install_options 0)
  119.             (
  120.                 ; ----- COPY the DMA program over
  121.                 (working "Installing DMA program from current dir.")
  122.                 (copyfiles
  123.                     (source "DMA")
  124.                     (dest DMA_dest)
  125.                 )
  126.                 ; ----- CREATE Players,Chars dirs, COPY Players/#?
  127.                 (makedir (tackon DMA_dest "Chars"))
  128.                 (if (NOT (exists (tackon DMA_dest "Players")))
  129.                     (
  130.                     (makedir (tackon DMA_dest "Players"))
  131.                     )
  132.                 )
  133.                 (working "Installing Players from Players dir.")
  134.                 (copyfiles
  135.                     (source "Players")
  136.                     (dest (tackon DMA_dest "Players"))
  137.                     (all)
  138.                 )
  139.                 ; ----- COPY the DMA.info if the icon doesn't exists
  140.                 (if (NOT (exists (tackon DMA_dest "DMA.info")))
  141.                     (copyfiles
  142.                         (source "DMA.info")
  143.                         (dest DMA_dest)
  144.                     )
  145.                 )
  146.             )
  147.         )
  148.         (complete 40)
  149.  
  150.  
  151.         ; -----------------
  152.         ; Installing DMA Modules
  153.         ; -----------------
  154.         (if (IN install_options 1)
  155.             (
  156.                 ; ----- CREATE Mods if it doesn't exist.
  157.                 (if (NOT (exists (tackon DMA_dest "Mods")))
  158.                     (
  159.                     (makedir (tackon DMA_dest "Mods"))
  160.                     )
  161.                 )
  162.                 (working "Installing Modules from Mods dir.")
  163.                 (copyfiles
  164.                     (source "Mods")
  165.                     (dest (tackon DMA_dest "Mods"))
  166.                     (all)
  167.                 )
  168.             )
  169.         )
  170.         (complete 50)
  171.  
  172.  
  173.         ; -----------------
  174.         ; Installing DMA Sounds
  175.         ; -----------------
  176.         (if (IN install_options 2)
  177.             (
  178.                 ; If Sounds doesn't exist, create it.
  179.                 (if (NOT (exists (tackon DMA_dest "Sounds")))
  180.                     (
  181.                     (makedir (tackon DMA_dest "Sounds"))
  182.                     )
  183.                 )
  184.                 (working "Installing Sounds from Sounds dir.")
  185.                 (copyfiles
  186.                     (source "Sounds")
  187.                     (dest (tackon DMA_dest "Sounds"))
  188.                     (all)
  189.                 )
  190.             )
  191.         )
  192.         (complete 70)
  193.  
  194.         ; -----------------
  195.         ; Installing DMA Docs
  196.         ; -----------------
  197.         (if (IN install_options 3)
  198.             (
  199.                 ; If Docs doesn't exist, create it.
  200.                 (if (NOT (exists (tackon DMA_dest "Docs")))
  201.                     (
  202.                     (makedir (tackon DMA_dest "Docs"))
  203.                     )
  204.                 )
  205.                 (working "Installing Documentation from Docs dir.")
  206.                 (copyfiles
  207.                     (source "Docs")
  208.                     (dest (tackon DMA_dest "Docs"))
  209.                     (all)
  210.                 )
  211.                 (working "Installing Docs Icon from current dir.")
  212.                 (copyfiles
  213.                      (source "Docs.info")
  214.                      (dest DMA_dest)
  215.                     (files)
  216.                 )
  217.             )
  218.         )
  219.         (complete 80)
  220.  
  221.         ; -----------------
  222.         ; Installing DMA Libs
  223.         ; -----------------
  224.         (if (IN install_options 4)
  225.             (
  226.                 ; If DMALibs doesn't exist, create it.
  227.                 (if (NOT (exists "LIBS:"))
  228.                     (
  229.                     (makedir "SYS:libs")
  230.                     )
  231.                 )
  232.                 (working "Installing System Libraries from Libs dir.")
  233.                 (if (< (/ (getversion) 65536) 37)
  234.                      (copyfiles
  235.                          (source "libs/reqtools.library")
  236.                          (dest "LIBS:")
  237.                         (files)
  238.                      )
  239.                 )
  240.                 (copyfiles
  241.                      (source "libs/reqtools.library")
  242.                      (dest "LIBS:")
  243.                     (files)
  244.                 )
  245.             )
  246.         )
  247.  
  248.         (run ("Avail FLUSH")
  249.  
  250.         )
  251.     )
  252. )
  253.  
  254. ; ------- STARTUP ÄNDERN
  255.  
  256. (complete 90)
  257.  
  258. (set command1 (cat "Assign DMA: " @default-dest))
  259.  
  260. (set command1.txt
  261.     (cat 
  262.          "\n\n\nNow I'm going to add to your user-startup this line :\n\n"
  263.          command1
  264.     )
  265. )
  266.  
  267. (startup "DMA"
  268.     (prompt command1.txt)
  269.     (help @startup-help)
  270.     (command command1)
  271. )
  272.  
  273. (if @pretend
  274.     (makeassign "DMA" @default-dest)
  275. )
  276.  
  277. ; ------- FERTIG
  278.  
  279. (complete 100)
  280.  
  281. (message (cat 
  282.     "Installation of Dungean Master Aid completed.\n\n\n"
  283.     "Hope we'll meet with another versions ;]"
  284. )
  285. )
  286.  
  287. (exit)
  288.